package IO;

import java.io.FileWriter;

public class FileWriterDemo {
    public static void main(String[] args) {
        FileWriter fw = null;
        try{
            fw = new FileWriter("d:/abc.txt");
            fw.write("系咪咁样，成个嗨样咁");
            fw.write("唔知点解会咁\r\n");
            fw.write("天若有情天亦老");
            fw.flush();
        }catch (Exception e){
            e.printStackTrace();
        }finally {
            try{
                if(fw != null){
                    fw.close();
                }
            }catch (Exception e){
                e.printStackTrace();
            }
        }
    }
}
